/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef LIB2D_OBJECTS_IMAGESIMPLE_H
#define LIB2D_OBJECTS_IMAGESIMPLE_H

#include "ImageSimpleRep.h"

namespace liba
{
namespace lib2d
{
namespace hard
{
class Renderer;
}
namespace objects
{

class ImageSimple : public SharedPrecached< filesystem::String, ImageSimpleRep >
{
public:
	explicit ImageSimple( const filesystem::String & image_name )
	{
		load_rep( image_name );
	}
//	int get_height()const;
//	int get_width()const;
	void blit( hard::Renderer * rend, const Vector2 & dst, const Rect & rect, int alpha = 255 );
	void blit( hard::Renderer * rend, const Vector2 & dst, int alpha = 255 );
	void fill_rect( hard::Renderer * rend, const Rect & dst_rect, int alpha = 255 );
	void fill_rect( hard::Renderer * rend, const Rect & dst_rect, const Rect & src_rect, int alpha = 255 );

private:
	hard::Image * check_and_get_image( hard::Renderer * rend );
};

} //namespace objects
} //namespace lib2d
} //namespace liba

using namespace liba;

#endif //LIB2D_OBJECTS_IMAGESIMPLE_H